package blog.util;

import io.vertx.core.json.JsonObject;

/**
 * 返回响应工具类
 */
public class RsUtil {

  public static JsonObject success(String message, Object resData){
    return new JsonObject().put("status",200).put("message",message).put("data",resData);
  }

  public static JsonObject success(String message){
    return new JsonObject().put("status",200).put("message",message);
  }

  public static JsonObject error(int statusCode, String message){
    return new JsonObject().put("status",statusCode).put("message",message);
  }
}
